package com.jasmine.bjstkserver.manager.os;

import com.jasmine.core.dto.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

/**
 * @author jasmineXz
 */
@RestController
@RequestMapping("/os")
public class OsController {

    @Autowired
    private OsManager osManager;

    @PostMapping("/upload")
    public R uploadPhoto(@RequestParam("file") MultipartFile file) {
        return R.ok(osManager.put(file,file.getOriginalFilename()));
    }

}
